from PIL import Image, ImageDraw, ImageFont
import lib.layout
import lib.Image
import config


def main():
    image_v = 400
    image_h = 300
    x = 0
    y = 0
    # 初始化字符串
    # str = lib.layout.getText()
    str = '1'
    # 创建图片
    # 定义文件名 数字需要用str强转
    im1 = lib.Image.ImageLayout(Image.new('RGB', (image_v, image_h)))
    im1.textView(x, y, str)
    im1.textView(x, y+im1.font_y, str)
    im1.save("1.jpg")
    im1.close()  # 关闭图片


if __name__ == '__main__':
    main()
